//
//  CacheManager.swift
//  HuaYun
//
//  Created by enghou on 2018/7/16.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

import UIKit

import Kingfisher

class CacheManager: NSObject {
    
    static func getSize(_ complete: @escaping (_ size: UInt)->Void)->Void{
        KingfisherManager.shared.cache.calculateDiskCacheSize(completion: { (size) in
            complete(size)
        })
    }
    
    static func clear()->Void{
        
        let cache = KingfisherManager.shared.cache
        
        cache.clearDiskCache()
        
        cache.cleanExpiredDiskCache()
        
        
    }
}
